#include"thread.h"
#include<thread>
 Thread::Thread(ThreadFunc func):threadId_(generateId_++)
 {
    func_ = func;
 }
Thread::~Thread()
  {

  }
void Thread::Start()
{
     std::thread t(func_,threadId_);
     t.detach();//Linux 里面的 pthread_detach
 }
int Thread::GetThreadId()
{
  return threadId_;
}
std::atomic_int  Thread::generateId_ = 0;